package com.chen.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 评论表
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("message")
@SuppressWarnings("all")
public class Message {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 内容
     */
    private String content;

    /**
     * 评论人
     */
    private String username;

    /**
     * 评论时间
     */
    private String time;

    /**
     * 父ID
     */
    private Long parentId;

    /**
     * 关联id
     */
    private Long foreignId;

    @TableField(exist = false)
    private String avatar;  //头像

    @TableField(exist = false)
    private Message parentMessage; //父信息

    @TableField(exist = false)
    private int total;


}
